/**
 * @(#)TextMoHis.java.java	1.0  16-06-2014 
 *
 * Copyright 2014 Viettel Telecome. All rights reserved.
 * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.viettel.core.entities.report;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 *  LICH SU MO TREN SCHEMAS AGRI_SERVICE
 *  @author: toantm1
 *  @since: 16-06-2014 - 10:21:19
 */
@Entity
@Table(name = "TEXT_MO_HIS")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@SequenceGenerator(name = "SEQ_STORE", sequenceName = "TEXT_MO_HIS_SEQ", allocationSize = 1)
public class TextMoHis implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 8378822136614602322L;

	/** The id. */
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_STORE")
	@Column(name = "ID", precision=10, scale=0)
	private Long id;
	
	/**
	 * Dau so nhan tin
	 */
	@Basic
	@Column(name = "MO_CONTENT", length=480)
	private String moContent;
	
	/**
	 * Dau so nhan tin
	 */
	@Basic
	@Column(name = "SENDER", length=14)
	private String sender;
	
	/**
	 * Dau so nhan tin
	 */
	@Basic
	@Column(name = "RECEIVER", length=14)
	private String receiver;
	
	/**
	 * 0: Viettel, 1: Vina, Mobi
	 */
	@Basic
	@Column(name = "TELCO", precision = 2, scale = 0)
	private Byte telco;
	
	/**
	 * Thoi gian gui tin
	 */
	@Basic
	@Column(name = "RECEIVE_TIME", columnDefinition = "timestamp(6) default systimestamp", insertable = true, updatable = true)
	@Temporal(TemporalType.TIMESTAMP)
	private Date receiveTime;
	
	/**
	 * 0:Dung cu phap, 1: Sai cu phap da sua, 2: Sai cu phap ko sua, 3, 4 cho command code, 
	 * 5: Sai dau so, 6: TB homepone, 7: Khong tim thay noi dung, 8: DK lap, 
	 * 9: Huy khi chua dk, 10: Loi he thong
	 */
	@Basic
	@Column(name = "STATUS", precision = 2, scale = 0)
	private Byte status;
	
	/**
	 * ID cua dich vu
	 */
	@Basic
	@Column(name = "SERVICE_ID", precision = 10, scale = 0)
	private Long serviceId;
	
	/**
	 * ID content
	 */
	@Basic
	@Column(name = "CONTENT_ID", precision = 22, scale = 0)
	private Long contentId;
	
	/**
	 * ID cua kenh dang ky
	 */
	@Basic
	@Column(name = "SOURCE_ID", precision = 10, scale = 0)
	private Long sourceId;
	
	/**
	 * Thoi gian gui tin
	 */
	@Basic
	@Column(name = "LOG_TIME", columnDefinition = "timestamp(6) default systimestamp", insertable = true, updatable = true)
	@Temporal(TemporalType.TIMESTAMP)
	private Date logTime;
	
	/**
	 * 0 la chua xu ly; 1 la da xu ly
	 */
	@Basic
	@Column(name = "PROCESSED", precision = 1, scale = 0)
	private Boolean processed;

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @return the moContent
	 */
	public String getMoContent() {
		return moContent;
	}

	/**
	 * @return the sender
	 */
	public String getSender() {
		return sender;
	}

	/**
	 * @return the receiver
	 */
	public String getReceiver() {
		return receiver;
	}

	/**
	 * @return the telco
	 */
	public Byte getTelco() {
		return telco;
	}

	/**
	 * @return the receiveTime
	 */
	public Date getReceiveTime() {
		return receiveTime;
	}

	/**
	 * @return the status
	 */
	public Byte getStatus() {
		return status;
	}

	/**
	 * @return the serviceId
	 */
	public Long getServiceId() {
		return serviceId;
	}

	/**
	 * @return the contentId
	 */
	public Long getContentId() {
		return contentId;
	}

	/**
	 * @return the sourceId
	 */
	public Long getSourceId() {
		return sourceId;
	}

	/**
	 * @return the logTime
	 */
	public Date getLogTime() {
		return logTime;
	}

	/**
	 * @return the processed
	 */
	public Boolean getProcessed() {
		return processed;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @param moContent the moContent to set
	 */
	public void setMoContent(String moContent) {
		this.moContent = moContent;
	}

	/**
	 * @param sender the sender to set
	 */
	public void setSender(String sender) {
		this.sender = sender;
	}

	/**
	 * @param receiver the receiver to set
	 */
	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	/**
	 * @param telco the telco to set
	 */
	public void setTelco(Byte telco) {
		this.telco = telco;
	}

	/**
	 * @param receiveTime the receiveTime to set
	 */
	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(Byte status) {
		this.status = status;
	}

	/**
	 * @param serviceId the serviceId to set
	 */
	public void setServiceId(Long serviceId) {
		this.serviceId = serviceId;
	}

	/**
	 * @param contentId the contentId to set
	 */
	public void setContentId(Long contentId) {
		this.contentId = contentId;
	}

	/**
	 * @param sourceId the sourceId to set
	 */
	public void setSourceId(Long sourceId) {
		this.sourceId = sourceId;
	}

	/**
	 * @param logTime the logTime to set
	 */
	public void setLogTime(Date logTime) {
		this.logTime = logTime;
	}

	/**
	 * @param processed the processed to set
	 */
	public void setProcessed(Boolean processed) {
		this.processed = processed;
	}
}
